package com.thread.thread05;
/**
 * synchronized的重入
 *
 *
 */
public class SyncDubbo1 {

	public synchronized void method1() {
		System.out.println("method1.....");
		method2();
	}
	public synchronized void method2() {
		System.out.println("method2.....");
		method3();
	}
	public synchronized void method3() {
		System.out.println("method3.....");
	}
	
	public static void main(String[] args) {
		SyncDubbo1 sdDubbo1 = new SyncDubbo1();
		Thread t1 = new Thread(new Runnable() {
			
			@Override
			public void run() {
				
				sdDubbo1.method1();
			}
		},"t1");
		t1.start();
	}
}
